package aj.controller;

import aj.bo.AjBuyRecord;
import aj.bo.ViewAjBuyRecordDetail;
import aj.service.ViewAjBuyRecordDetailService;
import framework.common.ResponseVo;
import framework.util.queryFilter.service.impl.QueryFilter;
import framework.util.queryFilter.vo.Where;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import frameworkExt.util.controller.BaseControllerExt;
import aj.service.AjBuyRecordDetailService;;import java.util.List;

@Controller
@RequestMapping("/aj/AjBuyRecordDetail.do")
public class AjBuyRecordDetailController extends BaseControllerExt {

    @Resource
    private AjBuyRecordDetailService service;
    @Resource
    private ViewAjBuyRecordDetailService viewAjBuyRecordDetailService;


    @ResponseBody
    @RequestMapping(params = "method=listBybuyLid")
    public ResponseVo listBybuyLid(ModelAndView model, HttpServletRequest request, HttpServletResponse response){
        QueryFilter filter = new QueryFilter(request, false);
        List<ViewAjBuyRecordDetail> list = viewAjBuyRecordDetailService.getAll(filter);
        return sendSuccess(list, filter.getPageBean().getTotals());
    }

}
